
#include "AVPlayerProxy.h"
#include "AVPlayer.h"

AVPlayer &AVInstance() {
    static AVPlayer instance;
    return instance;
}

void AVPlayerProxy::Init(void *winId, int winWidth, int winHeight) {
    AVInstance().Init(winId, winWidth, winHeight);
}

void AVPlayerProxy::Play(const std::string &url) {
    AVPlayer& instance = AVInstance();
    instance.start(url.c_str());

}

void AVPlayerProxy::Pause() { AVInstance().Pause(); }

void AVPlayerProxy::Resume() { AVInstance().Resume(); }

